package com.appkubes.mall.admin.application.goods.category.dao;

import com.appkubes.mall.core.pojo.MallGoodsCategoryMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface CategoryDao extends MallGoodsCategoryMapper {

    @Delete({"<script>",
            "Delete from mall_goods_category where category_key in ",
            "<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'> #{id} </foreach> " ,
            "</script>"})
    int delete(@Param("ids") String[] ids);

}
